]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageList: Pass tracked object to connectObject() calls
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 3 Sep 2026 17:13:37 +0000 (19:13 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 13 Sep 2026 17:39:10 +0000 (19:39 +0200)
Otherwise the handler will be associated with the `globalThis`
object and never get disconnected automatically.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4382>
(cherry picked from commit a939de4ad783767f97bf2c62023ca641c7736225)

js/ui/messageList.js

index 3c5adbc94267e3ee09c93bb20ce7fa5c3bd23903..cf9e501d05d7220f6514677dc02b46eeb7b3daac 100644 (file)
@@ -58,7 +58,8 @@ class URLHighlighter extends St.Label {
         this._clickGesture = new Clutter.ClickGesture();
         this._clickGesture.connectObject(
             'recognize', this._onClick.bind(this),
-            'may-recognize', this._checkInUrl.bind(this));
+            'may-recognize', this._checkInUrl.bind(this),
+            this);
         this.add_action(this._clickGesture);
     }
 
@@ -2016,7 +2017,9 @@ const FadeEffect = GObject.registerClass({
 
         this._vadjustment?.disconnectObject(this);
         this._vadjustment = newAdj;
-        this._vadjustment?.connectObject('changed', this._updateEnabled.bind(this));
+        this._vadjustment?.connectObject(
+            'changed', this._updateEnabled.bind(this),
+            this);
         this._updateEnabled();
     }
 
@@ -2026,7 +2029,9 @@ const FadeEffect = GObject.registerClass({
 
         this.actor?.disconnectObject(this);
 
-        actor?.connectObject('notify::vadjustment', this._vadjustmentChanged.bind(this));
+        actor?.connectObject(
+            'notify::vadjustment', this._vadjustmentChanged.bind(this),
+            this);
         super.vfunc_set_actor(actor);
         this._vadjustmentChanged();
     }